package com.kotasoft.iip.model.insurance;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.kotasoft.iip.model.interfaces.HasBuyDistribution;

@Entity
@Table(name = "I_PAYMENT")
@DiscriminatorValue("P")
@SuppressWarnings("serial")
public class Payment extends Order implements HasBuyDistribution {

	@OneToMany(cascade = CascadeType.DETACH, fetch = FetchType.LAZY)
	private List<OrderDistribution> buyDistribution;

	public List<OrderDistribution> getBuyDistribution() {
		return buyDistribution;
	}

	public void setBuyDistribution(List<OrderDistribution> buyDistribution) {
		this.buyDistribution = buyDistribution;
	}

}
